# {{ cookiecutter.project_name }}

{{ cookiecutter.project_description }}

## Installation

{% if cookiecutter.package_manager == "poetry" -%}
### Using Poetry (Recommended)

```bash
# Clone the repository
git clone <your-repo-url>
cd {{ cookiecutter.project_slug }}

# Install dependencies
poetry install

# Activate the virtual environment
poetry shell

# Run the CLI
poetry run {{ cookiecutter.project_slug }} --help
```

### Using pip

```bash
# Clone and install
git clone <your-repo-url>
cd {{ cookiecutter.project_slug }}
pip install -e .

# Run the CLI
{{ cookiecutter.project_slug }} --help
```
{% elif cookiecutter.package_manager == "pip" -%}
### Using pip

```bash
# Clone the repository
git clone <your-repo-url>
cd {{ cookiecutter.project_slug }}

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run the CLI
python -m {{ cookiecutter.project_slug }} --help
```
{% elif cookiecutter.package_manager == "pipenv" -%}
### Using Pipenv

```bash
# Clone the repository
git clone <your-repo-url>
cd {{ cookiecutter.project_slug }}

# Install dependencies
pipenv install --dev

# Activate the virtual environment
pipenv shell

# Run the CLI
python -m {{ cookiecutter.project_slug }} --help
```
{% endif -%}

## Usage

Basic usage:

```bash
{{ cookiecutter.project_slug }} --help
```

### Examples

```bash
# Example command
{{ cookiecutter.project_slug }} hello --name "World"
```

{% if cookiecutter.use_config_files == "yes" -%}
### Configuration

The CLI supports configuration files in {{ cookiecutter.config_format|upper }} format. Create a `config.{{ cookiecutter.config_format }}` file:

{% if cookiecutter.config_format == "toml" -%}
```toml
[settings]
debug = false
verbose = true
```
{% elif cookiecutter.config_format == "yaml" -%}
```yaml
settings:
  debug: false
  verbose: true
```
{% elif cookiecutter.config_format == "json" -%}
```json
{
  "settings": {
    "debug": false,
    "verbose": true
  }
}
```
{% endif -%}
{% endif -%}

## Development

{% if cookiecutter.use_testing == "yes" -%}
### Running Tests

```bash
{% if cookiecutter.package_manager == "poetry" -%}
poetry run pytest
{% else -%}
pytest
{% endif -%}
```

### Test Coverage

```bash
{% if cookiecutter.package_manager == "poetry" -%}
poetry run pytest --cov={{ cookiecutter.project_slug }} --cov-report=html
{% else -%}
pytest --cov={{ cookiecutter.project_slug }} --cov-report=html
{% endif -%}
```
{% endif -%}

{% if cookiecutter.use_linting == "yes" -%}
### Code Formatting and Linting

```bash
# Format code
{% if cookiecutter.package_manager == "poetry" -%}
poetry run black .
{% else -%}
black .
{% endif -%}

# Lint code
{% if cookiecutter.package_manager == "poetry" -%}
poetry run ruff check
{% else -%}
ruff check
{% endif -%}

# Type checking
{% if cookiecutter.package_manager == "poetry" -%}
poetry run mypy .
{% else -%}
mypy .
{% endif -%}
```
{% endif -%}

{% if cookiecutter.use_pre_commit == "yes" -%}
### Pre-commit Hooks

This project uses pre-commit hooks to ensure code quality:

```bash
# Install pre-commit hooks
pre-commit install

# Run pre-commit on all files
pre-commit run --all-files
```
{% endif -%}

## Project Structure

```
{{ cookiecutter.project_slug }}/
├── src/
│   └── {{ cookiecutter.project_slug }}/
│       ├── __init__.py
│       ├── main.py          # Main CLI entry point
│       ├── cli/             # CLI commands
│       └── core/            # Core business logic
{% if cookiecutter.use_testing == "yes" -%}
├── tests/                   # Test files
{% endif -%}
{% if cookiecutter.use_documentation == "yes" -%}
├── docs/                    # Documentation
{% endif -%}
├── pyproject.toml           # Project configuration
└── README.md
```

## Features

{% if cookiecutter.cli_framework == "typer" -%}
- ⚡ **Modern CLI** - Built with Typer for type-safe, auto-documented commands
{% elif cookiecutter.cli_framework == "click" -%}
- ⚡ **Robust CLI** - Built with Click for powerful command-line interfaces
{% elif cookiecutter.cli_framework == "argparse" -%}
- ⚡ **Simple CLI** - Built with argparse for lightweight command-line parsing
{% endif -%}
{% if cookiecutter.use_rich == "yes" -%}
- 🎨 **Beautiful Output** - Rich terminal formatting with colors and progress bars
{% endif -%}
{% if cookiecutter.use_logging == "yes" -%}
- 📝 **Structured Logging** - Comprehensive logging with Loguru
{% endif -%}
{% if cookiecutter.use_config_files == "yes" -%}
- ⚙️  **Configuration** - Support for {{ cookiecutter.config_format|upper }} configuration files
{% endif -%}
{% if cookiecutter.use_web_client == "yes" -%}
- 🌐 **HTTP Client** - Built-in HTTP client with httpx
{% endif -%}
{% if cookiecutter.use_testing == "yes" -%}
- 🧪 **Testing** - Comprehensive test suite with pytest
{% endif -%}
{% if cookiecutter.use_linting == "yes" -%}
- 🔍 **Code Quality** - Linting and formatting with ruff, black, and mypy
{% endif -%}
{% if cookiecutter.use_github_actions == "yes" -%}
- 🚀 **CI/CD** - GitHub Actions workflow included
{% endif -%}

## Contributing

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Run tests and linting
5. Commit your changes (`git commit -m 'Add amazing feature'`)
6. Push to the branch (`git push origin feature/amazing-feature`)
7. Open a Pull Request

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- Created with [kens-pythontools](https://github.com/kenkai/kens-pythontools)
{% if cookiecutter.cli_framework == "typer" -%}
- Built with [Typer](https://typer.tiangolo.com/)
{% elif cookiecutter.cli_framework == "click" -%}
- Built with [Click](https://click.palletsprojects.com/)
{% endif -%}
{% if cookiecutter.use_rich == "yes" -%}
- Styled with [Rich](https://rich.readthedocs.io/)
{% endif %}
